// 6. 抽象类
// 常规类
class Person {
    name:string
    age:number

    constructor(name:string, age:number){
        this.name = name
        this.age = age
    }
}

// 继承：
class Student extends Person {

}

// 继承：
class Teacher extends Person {

}

const p1 = new Person('张三',98)
const p2 = new Person('李四',99)
console.log(p1)
console.log(p2)

// Student实例
const s1 = new Student('张同学',109)
const s2 = new Student('李同学',110)
console.log(s1)
console.log(s2)

// Teacher实例
const t1 = new Teacher('刘⽼师',104)
const t2 = new Teacher('孙⽼师',105)
console.log(t1)
console.log(t2)

// 抽象类：不能去实例化，但可以被别⼈继承，抽象类⾥有抽象⽅法
